package com.example.m_kartupay;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class PaymentActivity extends TabActivity {
	ImageButton home;
	  @Override
	    public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        setContentView(R.layout.payment);
	        home = (ImageButton) findViewById(R.id.imgHome);
	        
	        home.setOnClickListener(new View.OnClickListener() {

				public void onClick(View view) {
									
					Intent mainmenu = new Intent(getApplicationContext(), MainMenuActivity.class);
					mainmenu.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
			    	startActivity(mainmenu);
			    	
			    	finish();

					
				}
			});
	        
	        TabHost tabHost = getTabHost();
	        
	       
	        TabSpec kartuPayAccount = tabHost.newTabSpec("tab1");
	       // photospec.setIndicator("All", getResources().getDrawable(R.drawable.red_tab));
	        kartuPayAccount.setIndicator("Pay Merchant's Invoice");
	        Intent photosIntent = new Intent(this, PaymentMerchantInvoice.class);
	        kartuPayAccount.setContent(photosIntent);
	        
	       
	        TabSpec bankAccount = tabHost.newTabSpec("tab2");
	        // setting Title and Icon for the Tab
	        bankAccount.setIndicator("Pay Billing");
	        Intent songsIntent = new Intent(this, AccountTransactions.class);
	        bankAccount.setContent(songsIntent);
	        
	       
	        
	        // Adding all TabSpec to TabHost
	        tabHost.addTab(kartuPayAccount); 
	        tabHost.addTab(bankAccount); 
	        
	    }
}



